﻿#region Using Directives

using System;

#endregion Using Directives

namespace SharePointStu.CAMLHelper.CAML
{
    /// <summary>
    /// Class that defines a single ViewField element of a CAML query.
    /// </summary>
    public class ViewField : BaseElement
    {
        #region Constructors

        /// <summary>
        /// Initialise the <see cref="T:SharePointStu.CAMLHelper.CAML.ViewField"/> object.
        /// </summary>
        /// <param name="field">The value of the field identifier to set the view field rule with.</param>
        /// <param name="fieldRefType">The <see cref="T:SharePointStu.CAMLHelper.CAML.Types.FieldRefTypes"/> object type of the field to be viewed.</param>
        public ViewField(string field, Types.FieldRefTypes fieldRefType)
            : base(field, fieldRefType)
        {
        }

        /// <summary>
        /// Initialise the <see cref="T:SharePointStu.CAMLHelper.CAML.ViewField"/> object using a field reference type of name.
        /// </summary>
        /// <param name="field">The value of the field identifier to set the view field rule with.</param>
        public ViewField(string field)
            : base(field, Types.FieldRefTypes.Name)
        {
        }

        #endregion Constructors
    }
}
